In PowerShell single line comments start with a hash symbol, everything to the right of the # will be ignored
# This is a comment in PowerShell Get-ChildItem
You can also have multi-line comments using <# and #> at the beginning and end of the comment respectively.
<# This is a multi-line comment #> Get-ChildItem
Comment-based help topics can be added to functions and scripts. This is done using special help comment keywords that start with a period. Examples of these are below, you can add as many or as few of these to your script as needed to provide the relevant level of detailed help.
<# .SYNOPSIS This script/function does - What? .DESCRIPTION A more detailed description of why and how the function works. .PARAMETER DemoParam1 The parameter DemoParam1 is used to define the value of blah and also blah. .PARAMETER DemoParam2 The parameter DemoParam2 is used to define the value of blah and also blah. .EXAMPLE The example below does blah PS C:\> Example .EXAMPLE Another example .NOTES Author: Name Last Edit: yyyy-mm-dd Version 1.0 - initial release of blah Version 1.1 - update for blah #>